package com.lightsaber.trade.monitorclient.run.device;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import com.lightsaber.trade.monitorclient.service.device.CollectInfoForDeviceClientManager;
import com.lightsaber.trade.monitorclient.service.device.ViewCommandClientManager;

@Component
@Lazy(false)
public class InteractionInfoAction implements InitializingBean {

    @Autowired
    private CollectInfoForDeviceClientManager collectInfoForDeviceClientManager;

    @Autowired
    private ViewCommandClientManager viewCommandClientManager;

    @Override
    public void afterPropertiesSet() throws Exception {

        Thread viewCommandThread = new Thread(viewCommandClientManager);
        viewCommandThread.start();

        Thread collectInfoThread = new Thread(collectInfoForDeviceClientManager);
        collectInfoThread.start();

    }

}
